package com.xian.im.common.model.from;

import com.xian.im.common.validator.group.AddGroup;
import com.xian.im.common.validator.group.CheckGroup;
import com.xian.im.common.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * @program: xian-code
 * @description:
 * @author: liru.xian
 * @create: 2021-01-19 10:20
 **/
@Data
@ApiModel(
        value = "用户信息"
)
public class UserFrom implements Serializable {

    private Long orgId;
    @ApiModelProperty("头像")
    private String avatarUrl;
    @NotBlank(groups = {AddGroup.class},message = "用户昵称 不能为空")
    @ApiModelProperty("昵称")
    private String nickname;
    @ApiModelProperty("个性签名")
    private String signature;
    @ApiModelProperty("IM通讯账号")
    @NotBlank(groups = {UpdateGroup.class, CheckGroup.class},message = "用户IM通讯账号 不能为空")
    private String account;
    @ApiModelProperty("渠道ID")
    @NotBlank(groups = {AddGroup.class},message = "群组uniqueId 不能为空")
    private String orgUniqueId;
    @ApiModelProperty("群组ID")
    private String groupUniqueId;
    @ApiModelProperty("登录账号名")
    @NotBlank(groups = {AddGroup.class},message = "登录账号名 不能为空")
    private String userName;
    @ApiModelProperty("密码")
    @NotBlank(groups = {AddGroup.class,CheckGroup.class},message = "密码 不能为空")
    private String password;
    @ApiModelProperty("是否单点 0 是 1 不是")
    private Integer sso;
}
